<!DOCTYPE html>
<html lang="zh-cn" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>视频列表</title>
</head>
<body>
<table border="1" width="100%">
    <thead>
    <tr>
        <th>ID</th>
        <th>名称</th>
        <th>时长</th>
        <th>封面</th>
        <th>大小</th>
        <th>状态</th>
        <th>功能</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="video,stats:${videoList}">
        <th th:text="${video.id}">暂无数据</th>
        <th th:text="${video.name}">暂无数据</th>
        <th th:text="${video.duration+'秒'}">暂无数据</th>
        <th>
            <img alt="图片丢失" height="100px" th:src="${video.coverUrl}" width="200px">
        </th>
        <th th:text="${video.size}">暂无数据</th>
        <th th:text="${video.state==1?'等待上传腾讯云':(video.state==2?'等待转码':(video.state==3?'等待转码完成':'正常'))}">暂无数据</th>
        <th>
            <a th:href="${'play?fileId='+video.fileId}">播放</a>
        </th>
    </tr>
    </tbody>
    <tfoot>
    <tr>
        <th colspan="6">
            <a th:href="@{?limit={defaultLimit}&page=1(defaultLimit=${defaultLimit})}">最前页</a>
            <a th:href="@{?limit={defaultLimit}&page={index}(index=${pageIndex>1?pageIndex-1:pageIndex},defaultLimit=${defaultLimit})}">上一页</a>
            <span><span th:text="${pageIndex}"></span>&nbsp;/&nbsp;<span th:text="${pageCount}"></span></span>
            <a th:href="@{?limit={defaultLimit}&page={index}(index=${pageIndex<pageCount?pageIndex+1:pageIndex},defaultLimit=${defaultLimit})}">下一页</a>
            <a th:href="@{?limit={defaultLimit}&page={index}(index=${pageCount},defaultLimit=${defaultLimit})}">最后页</a>
        </th>
    </tr>
    </tfoot>
</table>

</body>
</html>